package org.example.commerce.dao.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * (TabOrder)实体类
 *
 * @author makejava
 * @since 2022-12-05 08:41:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Table(name = "tab_order")
public class Order implements Serializable {
    /**
     * ID
     */
    @Id
    @GeneratedValue(generator = "JDBC")
    private Integer id;
    /**
     * 流水号
     */
    private String code;
    /**
     * 下单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime createTime;
    /**
     * 下单用户
     */
    private String customer;
    /**
     * 总价
     */
    private BigDecimal  total;
    /**
     * 订单状态
     */
    private Integer status;
}

